package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

/**
 *
 */
public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw  = new OutputStreamWriter(fos, StandardCharsets.UTF_8);

//        String s = "是谁在吟唱 凤~求~凰~~~ ";
//        byte[] bytes = s.getBytes(StandardCharsets.UTF_8);
//        fos.write(bytes);

        osw.write("是谁在吟唱 凤~求~凰~ ");
        System.out.println("写出完毕");
        osw.close();
    }
}
